package com.example.droolstool.module;

import com.google.common.collect.Lists;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

/**
 * @Author 赵云龙
 * @Date 2020/6/26
 * @Description TODO
 */

@Data
public class EdgeModule extends DrlMessageModule{

    String target;

    String source;


    @Override
    public void setFromId(List<String> fromId) {
        if (StringUtils.isNoneBlank(source)) {
            this.fromId = Lists.newArrayList(source);
        }
    }

    @Override
    public void setToId(List<String> toId) {
       if (StringUtils.isNoneBlank(target)) {
           this.toId = Lists.newArrayList(target);
       }
    }

    @Override
    public void setType(String type) {
        this.type = "2";
    }
}
